package come.bjpowernode.javase.singleton;

public class SingletonEntityRight {
    private volatile static SingletonEntityRight uniqueSingleton;
    private SingletonEntityRight(){}
    public static SingletonEntityRight getInstance(){
        if(null == uniqueSingleton){
            synchronized (SingletonEntityRight.class){
                if(null == uniqueSingleton){
                    uniqueSingleton = new SingletonEntityRight();
                }
                /*uniqueSingleton = new SingletonEntityRight();*/
            }
        }
        return uniqueSingleton;
    }
}
